<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<meta name="apple-wap-web-app-capable" content="yes">
		<meta name="apple-wap-web-app-status-bar-style" content="black-translucent">
		<meta name="MobileOptimized" content="240"/>
		<title>战队报名</title>
		<script type="text/javascript" src="$!webPath/js/jquery.min.js" ></script>
		<script type="text/javascript" src="$!webPath/js/jquery.dialogBox.js"></script>
		<link rel="stylesheet" href="$!webPath/css/reset.css" />
		<link rel="stylesheet" href="$!webPath/css/style.css" />
		<link rel="stylesheet" href="$!webPath/css/jquery.dialogbox.css" />
	</head>
	<body>
		<div class="all">
			<div class="team_apply_tixing"><img  src="$!webPath/imgs/warning.png"><p>请在1小时内，购买战队门票并上传验证码，否则将释放报名资格。</p></div>
			<div class="team_apply_div"><input type="button" value="报名购票" class="team_apply_a"/></div>
			<div class="team_apply_shangchuan">若您已购票，请上传验证码确认报名资格。</div>
			<div class="team_apply_anniu">
				<input type="text" placeholder="请输入验证码" id="code">
				<input type="button" value="上传验证" onclick="validateTicket()">
			</div>
		</div>
	<div id="mask-dialogBox" style="display: none"></div>
	</body>
	<script>
		function validateTicket(){
			var code = jQuery("#code").val();
			jQuery.ajax({
				type: "POST",
				url: "$!webPath/activity/validate_ticket",
				data: {"code": 111111},
				success: function (data) {
					if(data = 'success'){
						window.location.href="$!webPath/activity/validate_success?activityId=$!activityId&teamId=$!teamId";
					} else {
						jQuery('#mask-dialogBox').dialogBox({
							hasClose: true,
							hasMask: true,
							title: '提示',
							content: '验证码有误，请确认后再试'
						});
					}
				}
			})
		}
	</script>
</html>
